import {
  getRechargeData,
  getWithdrawData,
  getMemberWinData,
  getRechargePayAmountData,
  getRechargeCountData,
  getWithdrawCountData,
} from './service';

export function getBasicItemData(val: string): Promise<any> {
  let getDataEffect: any;
  switch (val) {
    case 'rechargeSumMoney':
      getDataEffect = getRechargeData;
      break;
    case 'withdrawSumMoney':
      getDataEffect = getWithdrawData;
      break;
    case 'totalWinLose':
      getDataEffect = getMemberWinData;
      break;
    case 'rechargeSumPayAmount':
      getDataEffect = getRechargePayAmountData;
      break;
    case 'rechargeCount':
      getDataEffect = getRechargeCountData;
      break;
    case 'withdrawCount':
      getDataEffect = getWithdrawCountData;
      break;
    default:
      break;
  }
  return getDataEffect;
}
